<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh-CN"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.js"></script>
	<script type="text/javascript" src="js/bootstrap-modal.js"></script>
	<script type="text/javascript" src="js/bootstrap-transition.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
				
				$("#newFileType").click(function(){
				    $('#myModal').modal(option);
				});
				$("#btn").click(function(){
					$("#myform").submit();
				});
		});
	</script>
	<style type="text/css">
		.mytd{
			text-align:center;;
		}
	</style>
</head>
<body class="body">
	
	<%@ include file="include/head.jsp" %>
	
	<div class="container">
	  <div class="row">
		<div class="span3">
			<div style="padding: 8px 0;" class="well">
				<jsp:include page="include/nav.jsp">
					<jsp:param value="file" name="tag"/>
				</jsp:include>
			</div>
			</div>
		<div class="span9">
			
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="#"><i class="icon-th"></i>文件列表</a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a id="newFileType" href="#myModal" data-toggle="modal" class="link-black"">创建文件夹</a></li>
			</ul>
			<!-- 创建新文件夹 -->
			<div class="modal fade" id="myModal" class="modal hide fade" style="display:none;">
				<div class="modal-header">
					<a class="close" data-dismiss="modal">×</a>
					<h3>创建新文件夹</h3>
				</div>
				<div class="modal-body">
					<form action="fileshare.jspx" method="post" id="myform">
				        <fieldset>
				          <input type="hidden" name="m" value="newFileType">
				          <div class="control-group">
				            <label class="control-label" for="input01">文件夹名</label>
				            <div class="controls">
				              <input type="text" style="width:520px;" id="input01"  name="name">
				            </div>
				          </div>
				        </fieldset>
			      </form>          
				</div>
				<div class="modal-footer">
					<button type="button" id="btn" class="btn btn-primary" style="margin-left:20px;">保存</button>
					<a class="btn" data-dismiss="modal" href="">关闭</a>
				</div>
			</div>
			<div class="wall">
				<c:choose>
					<c:when test="${empty fileTypeList}">
						没有创建文件夹
					</c:when>
					<c:otherwise>
					<table class="table table-striped">
						<thead>
							<tr>
								<th width="20px"></th>
								<th width="20%">名称</th>
								<th width="20%">大小</th>
								<th width="20%">文件总数量</th>
								<th width="20%">创建时间</th>
								<th>创建人</th>
							</tr>
						</thead>
						<tbody>
					
							<c:forEach items="${fileTypeList}"  var="type">
								<tr>
							<td class="mytd">
								<img src="img/folder.png">
							</td>
							<td class="mytd"><a href="file.jspx?id=${type.id}">${type.name}</a></td>
							<td class="mytd">${type.totalsize }</td>
							<td class="mytd">${type.fileCounts }</td>
							<td class="mytd">${type.tiptime }</td>
							<td class="mytd">${type.e.name}</td>
						</tr>
							</c:forEach>
						</c:otherwise>
					</c:choose>
					</tbody>
				</table>
			</div>
			
			
		</div>

	  </div>
	</div>

</body></html>